package com.version1.test.mapper;

import com.version1.test.entity.ComparisonList;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ComparisonListMapper {
    @Select("SELECT * FROM vc_comparison_list WHERE id_number = #{idNumber}")
    ComparisonList selectByIdNumber(String idNumber);

    @Insert("INSERT INTO vc_comparison_list (name, id_number, current_position, affiliated_town, insurance_year_month, payment_unit) " +
            "VALUES (#{name}, #{idNumber}, #{currentPosition}, #{affiliatedTown}, #{insuranceYearMonth}, #{paymentUnit})")
    int insert(ComparisonList comparisonList);

    List<ComparisonList> selectAll();
}